<template>
	<view class="container">
		<view class="hzimg">
			<image src="/static/hjzx.jpg"></image>
			<view class="hzText">
				{{ app.language.userTj }}
			</view>
		</view>
		<view class="listBox">
			<!-- <view class="listItem">
				<image src="/static/huji.png"></image>
			</view> -->
			<view class="listItem" @click="handleListItem(1)">
				<view>旅店业登记</view>
				<image src="/static/ms.png"></image>
			</view>
			<view class="listItem" @click="handleListItem(2)">
				<view>出租房屋报备</view>
				<image src="/static/ms.png"></image>
			</view>
			<view class="listItem" @click="handleListItem(3)">
				<view>娱乐场所登记</view>
				<image src="/static/ms.png"></image>
			</view>
		</view>
	</view>
</template>

<script>
	const global = getApp().globalData;
	export default {
		data() {
			return {
				app: {
					global: global,
					name: global.appName,
					language: global.language
				},
			}
		},
		onLoad() {
			this.getToken
		},
		methods: {
			// 获取token
			getToken() {
				let that = this
				uni.getStorage({
					key: 'loginData',
					success: function(res) {
						let token = res.data.userInfo.appToken
						if (!token) {
							uni.navigateTo({
								url: '../login/login',
							});
						}
					}
				});
			},
			// 跳转详情页
			handleListItem(id){
				uni.navigateTo({
					url: '../user/tiijiaolist?id='+id,
				});
			}
		}


	}
</script>

<style>
	.hzimg image {
		width: 100%;
		height: 222rpx;
	}

	.hzText {
		position: absolute;
		top: 70rpx;
		left: 137rpx;
		font-size: 44rpx;
		color: #2f8ef9;
	}
	
	.listBox{
		padding: 10rpx 20rpx;
	}
	
	.listBox image{
		width: 100%;
		height: 152rpx;
		border-radius: 5rpx;
	}
	
	.listItem{
		border-bottom: 1px dashed #ddd;
		padding: 10rpx 0;
		margin-bottom: 10rpx;
		display: flex;
	}
	
	.listItem image{
		width: 30rpx;
		height: 30rpx;
		margin-left: auto;
	}
</style>